package com.cn.pet.mapper;

import com.cn.pet.model.pojo.Brand;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface BrandMapper {

//    @Results({
//            @Result(property = "id",column = "id"),
//            @Result(property = "brandName",column = "brand_name")
//    })
//    @Select("SELECT id,brand_name FROM brand")
    List<Brand> queryAll();

//    @Insert("INSERT INTO brand(brand_name) VALUES (#{brandName}) ")
    int insert(Brand brand) ;

//    @Delete("DELETE FROM brand WHERE ID = #{id}")
    void delete(@Param("id") int id);

//    @Update("UPDATE brand SET brand_name = #{brandName} WHERE id = #{id}")
    void update(Brand brand);

}
